package com.mcptt.db.model;

import android.content.ContentValues;

import com.mcptt.db.DbConst;

import java.io.Serializable;

public class OnlineInfo implements Serializable
{
	public static final int MapPointType_GPS = 0;

	//	private UserInfo sender = null;  //发送方属性
	private String userId = null;
	private int statue = 0;
	private String ip = null;


	public OnlineInfo(String userId, int statue,String ip) {
		this.userId = userId;
		this.statue = statue;
		this.ip = ip;
	}
	public boolean isSameOne(String mcId)
	{
		return userId.equals(mcId);
	}


	public ContentValues getContentValues(){
		ContentValues cv = new ContentValues();

		cv.put(DbConst.COL_UserId, userId);
		cv.put(DbConst.COL_State, 1);
		cv.put(DbConst.COL_Ip, ip);
		return cv;
	}
	public String getUserId() {
		return userId;
	}


	public int getStatue() {
		return statue;
	}
	public String toString()
	{
		StringBuffer buffer = new StringBuffer("MapPointInfo:");
		//buffer.append("receiver = ").append(receiver).append(",");
//		buffer.append("sender = ").append(sender).append(",");
		buffer.append("userId = ").append(userId).append(",");
		buffer.append("ip = ").append(ip).append(";");

		return buffer.toString();
	}
}
